package com.cms.recursoshumanos.facade;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

import java.io.InputStream;
import java.net.URL;

public class ImagenesFacade 
{

	public Bitmap LoadImageFromWebOperations(String url) 
	{
	    try 
	    {
	        InputStream is = (InputStream) new URL(url).getContent();
	        Drawable d = Drawable.createFromStream(is, "src name");
	        Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
	        return bitmap;
	    } 
	    catch (Exception e) 
	    {
	        return null;
	    }
	}
	
	
	
}
